<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TRealdataCo2concentration extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_realdata_CO2Concentration', function (Blueprint $table) {
             $table->engine = 'MEMORY';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->float('rd_Concentration1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration5', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration6', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration7', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration8', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration9', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration10', 9, 2)->nullable()->default(0)->comment('');
			$table->float('rd_Concentration_num', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration1hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration2hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration3hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration5hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration6hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration7hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration8hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration9hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration10hwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration1lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration2lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration3lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration5lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration6lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration7lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration8lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration9lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration10lwarn')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration1consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration2consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration3consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration4consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration5consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration6consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration7consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration8consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration9consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_Concentration10consta')->nullable()->default(0)->comment('');
			$table->boolean('rd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('pdi_index', 'pdi_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_realdata_CO2Concentration');
    }
}
